/**
 * 
 */
package de.tt.test;

import org.testng.annotations.Test;

import de.tt.user.entity.User;

/**
 * 
 * @author timur.tokoev
 * 
 */
@Test
public class UserFactory extends FactoryBase {

	public static final String CARGO_CON = "Con";
	public static final String CARGO_PIECE = "Piece";

	private static UserFactory INSTANCE = new UserFactory();

	public UserFactory() {
	}

	public static UserFactory getInstance() {
		return INSTANCE;
	}

	@Test(enabled = true)
	public static void createObjects() {
		save(createUser1());
		save(createUser2());
		save(createUser3());
	}

	private static User createUser1() {
		User user = new User();
		user.setFirstname("Timur");
		user.setLastname("Tokoev");
		user.setEmail("timur.tokoev@gmail.com");
		user.setPassword("test");
		return user;
	}

	private static User createUser2() {
		User user = new User();
		user.setFirstname("Jana");
		user.setLastname("Tokoev");
		user.setEmail("j.olkov@gmx.de");
		user.setPassword("test");
		return user;
	}

	private static User createUser3() {
		User user = new User();
		user.setFirstname("Roma");
		user.setLastname("Tokoev");
		user.setEmail("roma.tokoev@gmail.com");
		user.setPassword("test");
		return user;
	}
}
